#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_torque
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_torque(id_num=data.id_num, torque=data.torque, param=data.param, mode=data.mode)
    rospy.loginfo("set_torque_node")


def listener():
    rospy.init_node("set_torque", anonymous=True)
    rospy.Subscriber("set_torque", set_torque, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

